package daniel.taotao.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import daniel.taotao.common.pojo.itemCatList;
import daniel.taotao.service.ItemCataService;

@Controller
public class ItemCataController {
	@Autowired
	ItemCataService itemCataService;
	@RequestMapping("/item/cat/list")
	@ResponseBody
	public List<itemCatList> getItemCataList(@RequestParam(value="id",defaultValue="0") Long parentId){
		List<itemCatList> itemCataList = itemCataService.getItemCataList(parentId);
		
		return itemCataList;
	}
}
